﻿/*
 * Almathy Center - AboutWindow.xaml.cs
 * Copyright (C) 2011 Christophe LEMOINE
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * */
using System.Diagnostics;
using System.Reflection;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;

namespace AlmathyCenter
{
    /// <summary>
    /// Logique d'interaction pour AboutWindow.xaml
    /// </summary>
    public partial class AboutWindow : Window
    {

        public AboutWindow()
        {
            InitializeComponent();
            label2.Content = "version " + Assembly.GetExecutingAssembly().GetName().Version.ToString();
            label5.Content = (Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0] as AssemblyCopyrightAttribute).Copyright + ". ";
            label5.Content += (Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTrademarkAttribute), false)[0] as AssemblyTrademarkAttribute).Trademark;
        }

        private void NetClicked(object sender, MouseButtonEventArgs e)
        {
            Process p = new Process();
            p.StartInfo = new ProcessStartInfo((sender as Label).Content.ToString());
            p.Start();
        }

        private void MailClicked(object sender, MouseButtonEventArgs e)
        {
            Process p = new Process();
            p.StartInfo = new ProcessStartInfo("mailto:" + (sender as Label).Content.ToString());
            p.Start();
        }

    }

}
